--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit daa395cb8a39d341dbb1bdb43ffa89761f3cc60c
Parents : 81c51d0
Author : faragher <faragher@betweentheborders.com>
Date : 2024-03-27T21:41:31-05:00
Updated MMAP API for Windows
Changes
Diff
diff --git a/sbapp/sideband/geo.py b/sbapp/sideband/geo.py
index 17279d0f..77ad1571 100644
--- a/sbapp/sideband/geo.py
+++ b/sbapp/sideband/geo.py
@@ -418,7 +418,10 @@ class GeoidHeight(object):
raise Exception("File has the wrong length")
self.headerlen = headerlen
- self.raw = mmap.mmap(fd, fullsize, mmap.MAP_SHARED, mmap.PROT_READ)
+ if RNS.vendor.platformutils.is_windows():
+ self.raw = mmap.mmap(fd, fullsize, access=mmap.ACCESS_READ)
+ else:
+ self.raw = mmap.mmap(fd, fullsize, mmap.MAP_SHARED, mmap.PROT_READ)
self.rlonres = self.width / 360.0
self.rlatres = (self.height - 1) / 180.0
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────